home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 27 / CDROM27.iso / share / progra / mai / Date-Time, returning time left in a specified time period < prev    next >
Encoding:
Text File  |  1997-07-14  |  498 b   |  13 lines

  1. 'Description: Returns time information left in a specified time
  2.  
  3. 'Place the following code in a Form_Load()
  4.  
  5. dim rightnow, daysleft, hoursleft, minutesleft
  6. rightnow = now
  7. daysleft = Int (dateserial (year (rightnow) + 1, 1, 1) - rightnow)
  8. hoursleft = 24 - hour (rightnow)
  9. minutesleft = 60 - minute (rightnow)
  10.  
  11. label1(1).caption = daysleft & " days left in the year."
  12. label1(2).caption = hoursleft & " hours left in the day."
  13. label1(3).caption = minutesleft & " minutes left in the hour."